package it.unipg.bipod.web;

import javax.faces.bean.*;
import it.unipg.bipod.applicationLogic.*;

@ManagedBean(name="segretario")
@ViewScoped
public class SegretarioBean extends DefaultBean {
	@ManagedProperty(value="#{login.application}")
	private SegretarioApplication application;
	
	public SegretarioBean() {
		this.application = null;
	}

	public void setApplication(Application application) {
		this.application = (SegretarioApplication)application;
	}

	public Application getApplication() {
		return application;
	}
	
	public String getNome() {
		if (application != null)
			return application.getSegretario().getNome();
		
		return null;
	}
	
	public String getCognome() {
		if (application != null)
			return application.getSegretario().getCognome();
		
		return null;
	}
}
